import Vue from 'vue'
import VueRouter from 'vue-router'
// 导入 login
const login = () => import('../views/login/login.vue')
const home = () => import('../views/home/home.vue')
const search = () => import('../views/search/search.vue')
const searchReault = () => import('../views/searchResult/searchResult.vue')
const detail = () => import('../views/detail/detail.vue')
const my = () => import('../views/my/my.vue')
const myinfo = () => import('../views/myinfo/myinfo.vue')

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: login
  },
  {
    path: '/home',
    component: home
  },
  {
    path: '/search',
    component: search
  },
  {
    path: '/searchResult',
    component: searchReault
  },
  {
    path: '/detail',
    component: detail
  },
  {
    path: '/my',
    component: my
  },
  {
    path: '/myinfo',
    component: myinfo
  }
]

const router = new VueRouter({
  routes
})

export default router
